package rbac.domain.vo;

import java.time.LocalDateTime;

/**
 * ⽤户实体类
 */

public class UserVo extends BaseVo{
    public String username;
    public String name;
    public String mobile;
    public String email;
    public Integer deptId;
    public Integer roleId;
    public boolean enabled = true;
    public String deptName;
    public String roleName;

    public UserVo() {
    }

    public UserVo(Integer id, LocalDateTime createAt, LocalDateTime updateAt, String username, String name, String mobile, String email, Integer deptId, Integer roleId, boolean enabled, String deptName, String roleName) {
        super(id, createAt, updateAt);
        this.username = username;
        this.name = name;
        this.mobile = mobile;
        this.email = email;
        this.deptId = deptId;
        this.roleId = roleId;
        this.enabled = enabled;
        this.deptName = deptName;
        this.roleName = roleName;
    }

    public String toString(){
        return String.format("ID: %d, 用户名：%s, 姓名：%s, 手机号: %s, 邮箱：%s, 部门名称：%s, 角色名称: %s, 状态：%s",
                id, username, name, mobile, email, deptName, roleName, enabled ? "启用" : "禁用");
    }
}

